{% set productId = hook.query['product-id'] %}

{% set product = services.store.search('product', { 'ids': [productId]}).first %}

{% do hook.page.addExtension('myProduct', product) %}

{% set response = services.response.render('@MyApp/storefront/page/custom-page/index.html.twig', { 'page': hook.page }) %}
{% do response.setHeader("Content-Type", "text/plain") %}

{% do hook.setResponse(response) %}
